home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / A-Monthly Disks / (c)aaf.d64 / chain-saw (.txt) < prev    next >
Commodore BASIC  |  2007-02-04  |  5KB  |  104 lines

  1. 1 REM CHAIN-SAW (DISK LOG RCK3.0) (C)1986 BY R.C. KRULISH
  2. 10 PRINT"[158][147]";:POKE45,01:POKE46,51:POKE55,255:POKE56,127:CLR:GOTO40
  3. 20 GETA$:IFA$<>""THEN20
  4. 21 GETA$:IFA$=""THEN21
  5. 22 RETURN
  6. 30 I2=1
  7. 31 I1$=""
  8. 32 I1=38-POS(0):FORI3=0TOI1:PRINT" ";:NEXT:FORI3=1TOI1:PRINT"[157]";:NEXT
  9. 33 PRINT" [146][157][158]";
  10. 34 GOSUB20:I1=ASC(A$)
  11. 35 IFI1=13THENI1=VAL(I1$):PRINT" ":I2=0:RETURN
  12. 36 IFLEN(I1$)>0ANDI1=20THENPRINTA$;:I1$=LEFT$(I1$,LEN(I1$)-1):GOTO33
  13. 37 IFI2THENIFI1=47ORI1=44ORI1<43OR(I1>57ANDI1<>69)THEN34
  14. 38 IFI1=34OR(I1AND127)<32THEN34
  15. 39 PRINTA$;:I1$=I1$+A$:GOTO33
  16. 40 DIMB$(15):POKE53280,12:POKE53281,11
  17. 100 OPEN4,3:GOSUB1100:CLOSE4
  18. 110 PRINT"            DISK LOG RCK 3.0"
  19. 120 PRINT"        (C)1986 BY R.C. KRULISH"
  20. 130 GOSUB1000
  21. 140 PRINT""SPC(19)"[176]NORMAL"SPC(6)"= RET[146]"
  22. 150 PRINTSPC(8)"[213]TO SCREEN [219]HEADER ONLY = H[146]"
  23. 160 PRINT"  OUTPUT[179]"SPC(10)"[173]FOR MONITOR = M[146]"
  24. 170 PRINTSPC(8)"[202]TO PRINTER[178]NORMAL SIZE = N[146]"
  25. 180 PRINTSPC(19)"[173]TINY PRINT  = T[146]"
  26. 190 IFD=0THENOPEN15,8,15:SYS5400:D=1
  27. 200 GOSUB20:H=0:Z=3:P=0:IFA$="N"THENZ=4
  28. 210 IFA$="H"THENH=1:GOTO300
  29. 220 IFA$="M"THENRN=1
  30. 230 IFA$="T"THENZ=4:P=3
  31. 240 PRINT"  TRACE ALL FILES? (RET[146]/N[146])"
  32. 250 :
  33. 260 GOSUB20:FT=3:IFA$="N"THENFT=0:GOTO280
  34. 270 IFA$<>CHR$(13)THEN260
  35. 280 IFZ=3ORD$<>""THEN300
  36. 290 PRINT"  ENTER DATE/NOTE (OR RET[146])";:GOSUB31:D$=I1$:IFD$=""THEND$="*"
  37. 300 IFDE=0THENPRINT#15,"I0":GOSUB800:SYS5403:GOSUB1200
  38. 310 SP=(Z-3)*(24-4*P/3):OPEN4,Z:IFP=0THEN340
  39. 320 PRINT#4,CHR$(27)"S"CHR$(1);CHR$(27)"A"CHR$(6);
  40. 330 PRINT#4,CHR$(20)
  41. 340  PRINT"[147]":PRINT#4,SPC(SP);:GOSUB1110
  42. 350  PRINT#4,SPC(SP)N$"  "D$
  43. 360  PRINT#4,SPC(SP)"ID:"I$"("FI$")  DOS:"DO$"("S$")  BLOCKS FREE:"BF:PRINT#4
  44. 370 IFH=1THEN420
  45. 380 PRINT"       PLEASE WAIT. I'M WORKING![145][145][145]"
  46. 390 IFDE=0THENPRINT#15,"I0":SYS(5376+FT):GOSUB1300:DE=1:IFRN=1THEN620
  47. 400 IFDE<2THENSYS(5382+P):DE=2
  48. 410 SYS(5379+3*Z):IFZ=3THENGOSUB1020:GOSUB20
  49. 420 PRINT#4:CLOSE4
  50. 430 GOSUB1000:IFDE=0THENPRINT:GOTO480
  51. 440 PRINT"   PRESENT DATA:TO[178]SCREEN"SPC(7)"= RET[146]"
  52. 450 PRINTSPC(18)"[171]PRINTER[178]NORM = N[146]"
  53. 460 PRINTSPC(7)"OR"SPC(9)"[221]"SPC(7)"[173]TINY = T[146]"
  54. 470 PRINTSPC(18)"[173]MONITOR VIEW = M[146]"
  55. 480 PRINT"   DO NEW RUN:WITH[178]SAME OPTIONS = S[146]"
  56. 490 PRINTSPC(18)"[173]REDO OPTIONS = R[146]"
  57. 500 PRINTSPC(27)"EXIT = X[146]"
  58. 510 GOSUB20:IFDE=0THEN560
  59. 520 IFA$=CHR$(13)THENGOSUB750:P=0:Z=3:GOTO280
  60. 530 IFA$="N"THEN600
  61. 540 IFA$="T"THENP=3:GOTO610
  62. 550 IFA$="M"THENRN=2:GOTO620
  63. 560 IFA$="S"THENDE=0:GOTO300
  64. 570 IFA$="R"THENGOSUB750:DE=0:PRINT"[147]":GOTO100
  65. 580 IFA$="X"THEN750
  66. 590 GOTO510
  67. 600 GOSUB750:P=0
  68. 610 SYS(5394+P):Z=4:GOTO280
  69. 620 GOSUB1030:GOSUB20:IFA$="Y"THENSYS36275
  70. 700 ONRNGOTO710,720
  71. 710 RN=0:GOTO340
  72. 720 RN=0:PRINT"[147]":GOTO430
  73. 750 IFP=0THEN770
  74. 760 OPEN4,4:PRINT#4,CHR$(27)"@":CLOSE4
  75. 770 IFA$="X"THENCLOSE15:END
  76. 780 RETURN
  77. 800 INPUT#15,EN,EN$,ET,ES:IFEN=0THENRETURN
  78. 820 PRINT""EN;EN$;ET;ES:CLOSE15:END
  79. 830 B=PEEK(L):IFB=34THENB=39
  80. 840 IF(127ANDB)<32THENB=63
  81. 850 B$(N)=CHR$(B):RETURN
  82. 1000 PRINT"  [159]INSERT SUBJECT DISK BEFORE SELECTING[158]":RETURN
  83. 1020 PRINT"      (PRESS ANY KEY TO CONTINUE)":RETURN
  84. 1030 PRINT"[147]   PROCEED ONLY IF MONITOR IS LOADED"
  85. 1032 PRINT"    AND ADDRESSABLE AT $8DB3 (36275)"
  86. 1034 PRINT"         (DATA STARTS AT $2000)"
  87. 1036 PRINT"   USE 'GOTO 700' TO RE-ENTER PROGRAM"
  88. 1038 PRINT"             PROCEED? (Y[146]/N[146])":RETURN
  89. 1100 PRINT"[147] ";:GOTO1120
  90. 1110 PRINT" ";
  91. 1120 PRINT#4,"************* CHAIN-SAW **************":PRINT"[146]":RETURN
  92. 1200 N=0:L=7938+N:GOSUB830:S$=B$(0)
  93. 1210 N$="":FORN=0TO15:L=8080+N:GOSUB830
  94. 1220 IFB$(N)=CHR$(160)THENB$(N)=""
  95. 1230 N$=N$+B$(N):NEXT
  96. 1240 FORN=0TO4:L=8098+N:GOSUB830:NEXT
  97. 1250 I$=B$(0)+B$(1):DO$=B$(3)+B$(4)
  98. 1260 FORN=0TO1:L=7918+N:GOSUB830:NEXT:FI$=B$(0)+B$(1)
  99. 1270 BF=PEEK(7916)+256*PEEK(7917):RETURN
  100. 1300 S=54272:FORN=0TO23:POKES+N,0:NEXT:POKES+24,15:POKES+1,130:POKES+5,9
  101. 1310 POKES+15,30:POKES+4,21:FORT=1TO1000:NEXT:POKES+4,20:FORT=1TO10:NEXT
  102. 1320 POKES+24,0:RETURN
  103. 1400 END
  104.